import turtle as t
a = 300

t.setup(500,500,200,200)
t.penup()
t.fd(-150)
t.right(90)
t.fd(150)
t.left(90)
t.pendown()
t.pensize(5)
t.pencolor("black")

def locate():
    t.penup()
    t.fd(10)
    t.left(90)
    t.fd(10)
    t.right(90)
    t.pendown()
def draw_square(a,c):
    t.fillcolor(c)
    t.begin_fill()
    for i in range(4):
        t.fd(a)
        t.left(90)
    t.end_fill()
for i in range(5):
    draw_square(a, "red")
    locate()
    draw_square(a-20, "yellow")
    locate()
    draw_square(a-40, "blue")
    locate()
    a = a-60